home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / Alpha ƒ / Help / Metafont Help < prev    next >
Encoding:
Text File  |  2000-10-30  |  19.5 KB  |  656 lines

  1.  
  2. Metafont Mode Help 
  3.  
  4.                                                 version : 1.2
  5.                                                 Created : 5 avril 2000 - 9:35:21 
  6.                                       Last modification : 9 mai 2000 - 13:04:22
  7.  
  8.  
  9.           Introduction
  10.  
  11. Metafont Mode is a mode for the text editor Alpha: it is designed to make
  12. writing, processing and testing of Metafont source files much easier. 
  13. Metafont is the programming language written, as a companion to TeX, by
  14. Donald Knuth in order to create characters, fonts, font families (and many
  15. other things).
  16.  
  17. Once Metafont mode is installed, the opening of a Metafont source file (i-e
  18. with extension ".mf") invokes a new menu (called Metafont !)  in the menu
  19. bar with the following features:
  20.  
  21. • easy insertion of all the basic Metafont commands (with electric stops)
  22. • syntax colorizing
  23. • capacity to process a source file from within Alpha with various flags,
  24.   printer modes, input base files
  25. • editing of the log file
  26. • capacity to make the pk file, to make the dvi from the generic font, to
  27.   view the dvi;
  28. • creating and editing the property list for a font
  29. • processing all the source files in a folder instead of a single file
  30. • file marking
  31. • ready to use template for a new font
  32. • key bindings to choose the processing mode, process files etc.
  33. • command clicking on a word leads to its definition
  34. • option clicking on the title bar of a window brings a list of .mf and
  35.   .log file at the same level or in a selected folder and allows to edit them
  36.  
  37. As of this release, both CMacTeX Metafont and OzMetafont are supported.
  38.  
  39. See the "Metafont Example.mf" file for an example syntax file.  This will 
  40. automatically insert the Metafont menu into the menu bar.
  41.  
  42.  
  43.           Using the Metafont menu:
  44.  
  45.  
  46.     Switch To Metafont
  47.  
  48. Launches the Metafont application in front
  49.  
  50.     Run The Buffer
  51.  
  52. Calls up the Metafont application and processes the current window
  53.  
  54.     Save And Run
  55.  
  56. Saves the current window and calls up the Metafont application to process
  57. it.
  58.  
  59.     Run a File
  60.  
  61. Prompts you for a "mf" file to run.
  62.  
  63. When pressing the option key <Run a File> becomes 
  64.  
  65.     Run a Folder
  66.                         
  67. Prompts you for a fileset of "mf" files to run.
  68.  
  69. When pressing the shift key "Run a File" becomes 
  70.  
  71.     Run Current Folder
  72.                         
  73. Metafont will execute all the "mf" files in the currently selected Folder
  74. if any.  Current Folder here means a folder previously selected with one of
  75. the following items: "Run a Folder", "TftoPl a Folder" and "VptoVf a
  76. folder".  Its name is reflected at the bottom of the "Other Files" submenu.
  77.  
  78.  
  79.     Choose Metafont Mode
  80.     ---------------------
  81.  
  82. The word mode has a different meaning for Alpha and for Metafont: here it
  83. means the Metafont's printer mode, the one you specify when you (or
  84. Maketexpk) process a font.  As usual with Metafont if no mode is specified,
  85. the default is proof.  You can choose among the following list.  
  86.  
  87. User Defined should be set in the Current Mode Prefs: it is the printer
  88. mode at your installation.  If you do not know which mode corresponds to
  89. your installation, look in the modes.mf file which comes with your TeX
  90. distribution.  You can edit this file directly in Alpha from this Metafont
  91. Menu (see below).
  92.  
  93.     Proof
  94.  
  95. To make proof characters at 2602 resolution (36 pixels per point).  No tfm
  96. file is produced in this mode.
  97.  
  98.     Smoke
  99.  
  100. To make black proof characters.  No tfm file is produced in this mode.
  101.  
  102.     Localfont
  103.  
  104. Use this mode when you do not know the printer mode's name of your
  105. installation: if your administrator did his job well, the "localfont
  106. variable" contains the printer mode.
  107.  
  108.     User Defined
  109.  
  110. Comes as default as canonex: you set here what you want.
  111.  
  112.     
  113.     Processing Options
  114.     ------------------
  115.  
  116. Define here any particular processing option allowed by Metafont.
  117.  
  118.     Mag...
  119.  
  120. Default value is 1, which means no magnification.
  121.  
  122.     Magstep...
  123.  
  124. Default value is 0, which means no magnification Note that you choose a
  125. magnification either in mag or in magstep: if you choose the magstep
  126. syntax, any choice you previously made with mag will be omitted (and vice
  127. versa).
  128.  
  129.     Base File...    
  130.  
  131. You can specify a particular file (a base file for instance) which should
  132. be input before the file you want to process.  Like in the command line:
  133. mf \mode=foo ; input somebasefile.mf ; input currentwindowfile.mf To cancel
  134. an input file you have to clear all options (see below the menu item "Clear
  135. All Options")
  136.  
  137.     Gfcorners
  138.  
  139. Option to draw corners at the corners of the box containing each character. 
  140. Works in smoke mode.
  141.  
  142.     Imagerules
  143.  
  144. Option to draw the box of each character.
  145.  
  146.     Nodisplays    
  147.  
  148. Don't show the characters on the monitor: to build fonts faster
  149.  
  150.     Notransforms
  151.  
  152. Don't calculate any transformation if currenttransform is identity.  To run
  153. faster.
  154.  
  155.     Screenchars    
  156.  
  157. Show each character once it has been calculated.
  158.  
  159.     Screenstrokes
  160.  
  161. Show each character stroke after stroke while it is calculated
  162.  
  163.     Clear All Options    
  164.  
  165. Cancel all previous previously selected options.
  166.  
  167.     
  168.     Other Files
  169.     -----------
  170.     
  171.     Convert Gf To Pk        
  172.  
  173. Invokes gftopk to transform the "gf" file produced after a run of Metafont
  174. to the "pk" (packed) format.  This procedure reads in the log file to find
  175. the name of the gf file (which depends on the mode chosen and the mag): if
  176. the log file is missing, it won't work.
  177.  
  178. When pressing the option key:
  179.  
  180.     Convert All Gf To Pk    
  181.  
  182. All the gf files corresponding to a folder that has been processed by
  183. Metafont are converted to pk.
  184.  
  185.     Convert Gf To Dvi        
  186.  
  187. Invokes gftodvi to transform the "gf" file produced after a run of Metafont
  188. to a "dvi" (device independant) file.  This procedure reads in the log file
  189. to find the name of the gf file (which depends on the mode chosen and the
  190. mag): if the log file is missing, it won't work.  This item is present
  191. only when using CMacTeX Metafont.
  192.  
  193.     View Dvi File            
  194.  
  195. If a dvi file has been produced (see previous item) you can view it with
  196. the dvi previewer (dvipreview with CMacTeX, built-in previewer with Oz).
  197.  
  198.     Convert Tfm To Pl        
  199.  
  200. Invokes tftopl to transform the 'tfm" (TeX font metrics) file produced
  201. after a run of Metafont (in any mode but proof or smoke) to the "pl"
  202. (property list) format and edit it.  File extension will be "fpl" (font
  203. property list) instead of "pl" because "pl" is the extension of Perl script
  204. files and it invokes automatically the Perl menu (this is not what we
  205. want).
  206.  
  207. When pressing the option key:
  208.  
  209.     Convert All Tfm To Pl    
  210.  
  211. All the tfm files corresponding to a folder that has been processed by
  212. Metafont are converted to pl.
  213.     
  214.  
  215.     Tfm to pl...            
  216.  
  217. Prompts the user for a "tfm" file to convert to human readable format:
  218. extension of these files will be "fpl".
  219.  
  220. When pressing the option key:
  221.  
  222.     Tftopl A Folder        
  223.  
  224. All the tfm files in a folder are converted to pl.
  225.  
  226. When pressing the shift key:
  227.  
  228.     Tftopl Current Folder    
  229.  
  230. All the tfm files in the currently selected folder are converted to pl.
  231.  
  232.     Vpl To Vf...            
  233.  
  234. Prompts the user for a "vpl" file to convert to the corresponding "tfm" and
  235. "vf"
  236.  
  237. When pressing the option key:
  238.  
  239.     Vptovf A Folder        
  240.  
  241. All the "vpl" files in a folder are converted to the corresponding "tfm"
  242. and "vf".  Very useful if you use the fontinst package which can produce a
  243. lot of vpl files.
  244.  
  245. When pressing the shift key:
  246.  
  247.     Vptovf Current Folder    
  248.  
  249. All the "vpl" files in the currently selected folder are converted to the
  250. corresponding "tfm" and "vf".
  251.  
  252.     Open Log File            
  253.  
  254. Edit in Alpha (read-only) the log file corresponding to the currentwindow
  255. and produced by a run of Metafont on this current window.  
  256.  
  257. When pressing the option key:
  258.  
  259.     Open All Log Files    
  260.  
  261. All the log files corresponding to a folder that has been processed by
  262. Metafont are open.
  263.     
  264.     Open Property List     
  265.  
  266. Open the property list file related to the current window (if it exists,
  267. i-e if you have already converted the tfm to pl)
  268.  
  269. When pressing the option key:
  270.  
  271.     Open All Property Lists     
  272.  
  273. Opens all the Property Lists corresponding to a folder whose tfm files have
  274. been converted.
  275.  
  276.     Remove Files            
  277.  
  278. Sub menu to delete several types of files in the current folder: log, gf,
  279. pk, dvi, tfm, vf, pl, vpl.  The pl files will be removed only if they have
  280. the plf extension (to avoid accidentally destroying Perl script files)
  281.  
  282.  
  283.     Choose A Folder…
  284.     ----------------
  285.     
  286. Use the "Metafont --> Choose A Folder…" item to select another folder.  If
  287. a folder has already been selected, its name will be recalled at the bottom
  288. of the "Other Files" submenu.  It says either
  289.  
  290.     No Folder Selected
  291.  
  292. If no no folder is currently selected, or
  293.  
  294.     Current Folder Is
  295.  
  296. Followed by the name of the currently selected folder
  297.                                             selected folder
  298.  
  299.     Open Modes.mf
  300.  
  301. Edit (read-only) the modes.mf file.  It is the file containing the printer
  302. mode definitions for allmost all the available printers.
  303.  
  304.     Open Plain.mf
  305.  
  306. Edit (read-only) the plain.mf file.  It is the file containing the
  307. definition of all the basic Metafont macros.  Note: you have to set the
  308. paths to these files in the mode specific preferences when you first use
  309. the Metafont Mode.
  310.                     
  311.     New Font Template
  312.  
  313. Builds a template for a complete new font source file.  User is asked for
  314. the number of characters in the font.
  315.  
  316.     Other Submenus
  317.     --------------
  318.  
  319. All the remaining submenus contain the basic Metafont commands and macros:
  320. any item you choose will be inserted in your file at the cursor's current
  321. position with electric tabs for those commands which need arguments.  In
  322. some cases, you will be asked to enter a number (see "makegrid" for
  323. instance).  All the macros relevant to a particular aspect have been
  324. collected together in a (supposedly) logical way:
  325.  
  326.                                     
  327.     Boolean
  328.     Characters
  329.     Conditions
  330.     Debugging
  331.     Definitions
  332.     Displaying
  333.     Drawing
  334.     Font Internals
  335.     Functions
  336.     Internal Variables
  337.     Miscellaneous
  338.     Output
  339.     Paths
  340.     Pens
  341.     Pictures
  342.     Pixellisation
  343.     Positioning
  344.     Strings
  345.     Transformations
  346.     Modes Definitions
  347.     Variables
  348.  
  349. Make use of the option, shift and command keys to get variants of the
  350. macros.  For instance, if you hold the option key down, "addto contour"
  351. will become "addto contour withpen" ; with the command key you will get
  352. "addto contour withweight".
  353.  
  354.  
  355.           File marking
  356.  
  357.  
  358. Various elements are marked: macros definitions, character definitions,
  359. related files, input files etc.  and can be easily accessed through pop-up
  360. menus and option or commed clicking.
  361.                     
  362.  
  363.                The "M" pop-up menu
  364.  
  365.  
  366. If you choose to mark your file from the "M" pop-up menu (top right of your
  367. editing window), all the def, vardef and beginchar declarations in your
  368. source file will be marked.  Remember that the beginchar command is
  369. customizable (in the Mode Prefs) and any change you make there will be
  370. taken into account for marking.
  371.  
  372. If the 'Auto Mark' checkbox is checked in the Prefs, the file is
  373. automatically marked at opening.
  374.  
  375.  
  376.                The "{}" pop-up menu
  377.  
  378.  
  379. The "{}" pop-up menu (top right of your editing window) contains the
  380. functions and macros defined in your source file.  We list here all the
  381. def, primarydef, secondarydef, tertiarydef and vardef definitions as well
  382. as the files input with an "input" command.
  383.  
  384.  
  385.           Command-double-clicking a word
  386.  
  387.  
  388. If you Command-Double-Click on a keyword you access its definition.  This
  389. procedure looks first for a definition in the current file itself, then in
  390. the list of primitives, then in the plain Metafont macros file and finally
  391. in the other text files located in the same folder and called in the
  392. current file by an 'input' command (typically they are macros files).
  393.  
  394.  
  395.           Option clicking the title bar
  396.  
  397.  
  398. If you Option-Click on a the title bar, you get a list of all the .mf and
  399. .log files located:
  400.  
  401. • in the "local" folder (folder of your current window). 
  402. • in the "selected" folder (selected when you process an entire folder 
  403.     with "Run A Folder" or in the "Remove Files" sub menu)
  404.  
  405. Selecting any item in this list will open it in a window or bring its
  406. window to front if it is already open.
  407.  
  408.  
  409.           Key bindings
  410.  
  411.  
  412. There are a few easy to remember keybindings "à la emacs".  For all of them
  413. you have to hit 'ctrl-m', release, then hit one of the following letters:
  414.  
  415.     - p, s, l or u
  416.  
  417. to select respectively <p>roof, <s>moke, <l>ocalfont or <u>ser defined mode
  418.  
  419.     - b    to process the <b>uffer
  420.     - f    to process a <f>ile
  421.     - d    to process a <d>irectory
  422.     - n    to create a <n>ew font template
  423.     - m    to edit the <m>odes file 'modes.mf'
  424.     - c    to edit the macro <c>ommands file 'plain.mf'
  425.     - g    to edit the lo<g> file
  426.     - t    to convert <t>fm file to pl
  427.     - i    to convert gf file to dv<i>
  428.     - k    to convert gf file to p<k>
  429.     - i    to <v>iew the d<v>i
  430.  
  431.  
  432.  
  433.           Metafont Mode preferences
  434.  
  435.  
  436. The "Preferences…" item in the "Current Mode" submenu of the "Config" menu allows 
  437. you to edit specific preferences for the Metafont Mode. All of them 
  438. should be self-explanatory.
  439.  
  440. You can specify there:
  441.  
  442. • the paths to the modes.mf and plain.mf files.
  443. • the name of the output folder in which to put the files produced by 
  444.   Metafont, gftopk of tftopl
  445. • a "User Beginchar": it is customary in Metafont's font files to modify
  446.   the definition of the beginchar/endchar routine and to give it a different
  447.   name: for instance "beginlogochar" in the logo.mf font or "cmchar" in
  448.   Computer Modern fonts or whatever.  You can specify here this modified name
  449.   in order to get a correct file marking from the little "M" pop-up menu on
  450.   the top right corner of the current window.
  451. • the "Use Work Fold" flag can be set if you want to designate a different
  452.   folder for output (with the "Mfwork Folder" pref).  By default, the output
  453.   folder is the folder of the current window.  This feature will work only if
  454.   you have CMacTeX Metafont version 2.2.1 or later.
  455.  
  456.           
  457.     ----------------------------------------------------------------------
  458.  
  459.  
  460.           Version History
  461.  
  462.  
  463.  
  464.                1.0b1        03/28/99    
  465.  
  466. Created the Metafont Mode including the following features: new Metafont
  467. menu, submenus to insert Metafont macros with electric stops, syntax
  468. colorizing.
  469.  
  470.                1.0b2        03/30/99    
  471.  
  472. Added file marking: all the def and vardef declarations are marked.  All
  473. the beginchar environments are marked too (beginchar can be changed by the
  474. user).
  475.  
  476.                1.0b3        04/02/99    
  477.  
  478. Added submenu to choose the processing options (screenchars, screenstrokes
  479. etc) and the Metafont printer mode.  Added direct editing of the modes.mf
  480. and plain.mf files.  The paths to these files is stored in the Current Mode
  481. Prefs.
  482.  
  483.                1.0b4        04/06/99    
  484.  
  485. Added Apple event to have CMaCTeX process the current window or any mf
  486. file.  Added building of the entire command line that will be sent to
  487. Metafont.
  488.  
  489.                1.0b5        04/07/99    
  490.  
  491. Added error messages for noncompatible options.  Problems of compatibility
  492. between mag and magstep resolved.  Editing of the property list file (human
  493. readable translation of the tfm file)
  494.  
  495.                1.0b6        04/08/99    
  496.  
  497. Added conversion of gf file to pk file from the Metafont menu.
  498.  
  499.                1.0b7        04/09/99    
  500.  
  501. Improved error handling.  Corrected a few bugs.
  502.  
  503.                1.0b8        04/15/99    
  504.  
  505. Made "Other Files" submenu dynamic.  Includes the name of the current files
  506. and rebuilds each time it is necessary: when a window is changed, when a
  507. file has been processed etc.
  508.  
  509.                1.0b9        04/17/99    
  510.  
  511. Added alternate items in the menu: when pressing the option key, "Run a
  512. File" becomes "Run a Folder" etc.  We can now process a whole folder,
  513. convert all the processed files to pk; all the tfm to pl…
  514.  
  515.                1.0b10        04/19/99    
  516.  
  517. Added New Font Template.
  518.  
  519.                1.0b11        04/21/99    
  520.  
  521. Added new T. Kiffe's Apple event syntax for CMacTeX Metafont to take the
  522. output folder into account.
  523.  
  524.                1.0b12        04/27/99    
  525.  
  526. Added support for OzMetafont.  Since OzMetafont cannot receive a complete
  527. Mf command line through an Apple event, a temporary make file is created
  528. and processed by the built-in MakeTeXPk
  529.  
  530.                1.0b13        04/29/99    
  531.  
  532. Extended the "make file" technique to a complete folder.  Extended it to
  533. CmacTeX too.  Runs much faster: the user doesn't have anymore to confirm
  534. between each run of Metafont.
  535.  
  536.                1.0b14        05/25/99    
  537.  
  538. Corrected a bug concerning conversion of tfm to pl.
  539.  
  540.                1.0          05/27/99    
  541.  
  542. First public release of metafontMode (version 1.0).
  543.  
  544.                1.01          05/29/99    
  545.  
  546. Corrected a minor bug for the Metafont menu to build correctly with the
  547. newly released Alpha 7.2.
  548.  
  549.                1.01a          09/19/99    
  550.  
  551. Corrected a bug due to new Alpha 7.2 syntax: old proc isPositiveInteger is
  552. replaced now by is::PositiveInteger.
  553.  
  554.                1.1.1          09/21/99    
  555.  
  556. Started a Metapost Mode.  This will be a standalone mode so I have to
  557. change the name of the procedures in both modes to avoid interferences:
  558. all procs follow the "Mf::" naming convention.  rearranged the sub-menus.
  559.  
  560.                1.1.2          12/02/99    
  561.  
  562. Added a "Convert Gf to Dvi" command (only with CMacTeX) along with a "View
  563. Dvi" command in the submenu "OtherFiles".  Corrected a bug concerning the
  564. paths with the tfm to pl conversion.  Corrected multiple tftopl conversion
  565. routines.
  566.  
  567.                1.1.3          12/16/99    
  568.  
  569. Rewritten code to clarify the outputfolders'mess.  A new flag "useWorkFold"
  570. has been added: if not set the output folder defaults to the current
  571. folder ; if set you can choose a different folder for the output (only with
  572. CMacTeX Metafont 2.2.1 or later)
  573.  
  574.                1.1.4          01/12/00    
  575.  
  576. Redesigned the "Other Files" menu: it now indicates which is the currently
  577. selected folder.  Added a few items to the "Remove Files" submenu.  Added a
  578. userEndchar in the prefs (since there was already a userBeginchar, this is
  579. logical): they are used in the New Font Template (default values are
  580. beginchar and endchar) and with the "beginchar…endchar" menu item.
  581.  
  582.                1.1.5          02/12/00    
  583.  
  584. Corrected a bug: the vftovp menu item did not work because of a typing
  585. error.  Added a few keywords met in the pl files for syntax colorizing.
  586.  
  587.                1.1.6          03/07/00    
  588.  
  589. Added some menu items concerning pencircle and pensquare: press the option
  590. or the command key to get variants.  Added a proc to build a penstroke
  591. command : use the penstroke item with the option key.
  592.  
  593.                1.1.7          04/18/00    
  594.  
  595. Added missing primitives to the Keywords list.  Improved the mark file
  596. procedure.
  597.  
  598.                1.1.8          05/03/00    
  599.  
  600. Added a lot of key bindings.  Changed some basic code for future
  601. compatibility with Alpha 8 and Alphatk.
  602.  
  603.                1.2          05/08/00    
  604.  
  605. Added Mf::DblClick, Mf::OptionTitlebar, Mf::OptionTitlebarSelect and
  606. Mf::parseFuncs ad hoc procs.  Modified syntax colorizing to distinguish
  607. Metafont primitives from plain format macros.
  608.                         
  609.  
  610.           Known problems
  611.  
  612.  
  613. With versions of CMacTeX Metafont OLDER than 2.2.1 (this is Metafont's
  614. version number, not CMacTeX version number), the output folder defaults to
  615. the current window's folder.  In this case, don't change it in the mode
  616. specific preferences.
  617.  
  618. So far only CMacTeX Metafont and OzMetafont are supported: I'll try to add
  619. support for Textures in the future if there is a demand for it.
  620.  
  621. Please e-mail any problem or bug you encounter: <berdesg@easynet.fr>
  622.  
  623. Visit my Web page for updates and other Alpha utilities:
  624.  
  625.     <http://perso.easynet.fr/~berdesg/>
  626.  
  627. There is alos a MetaPOST Mode and an OMEGA Mode for Alpha there.
  628.  
  629.  
  630.     ----------------------------------------------------------------------
  631.  
  632.  
  633.           License and Disclaimer
  634.  
  635.  
  636. This program is free software; you can redistribute it and/or modify it under
  637. the terms of the GNU General Public License as published by the Free Software
  638. Foundation; either version 2 of the License, or any later version:
  639.  
  640.     <http://www.gnu.org/copyleft/gpl.html> 
  641.  
  642. This program is distributed in the hope that it will be useful, but WITHOUT
  643. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  644. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  645. details.  You should have received a copy of the GNU General Public License
  646. along with this program; if not, write to the FreeSoftware Foundation, Inc.,
  647. 675 Mass Ave, Cambridge, MA 02139, USA.
  648.  
  649.  
  650. Author : Bernard Desgraupes 
  651. e-mail : <berdesg@easynet.fr> 
  652.    www : <http://perso.easynet.fr/~berdesg/> 
  653.   
  654. (c) Copyright : Bernard Desgraupes 2000
  655.  
  656.